package com.cli.idempotent.util;

import com.cli.idempotent.model.ResultVo;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @author xiongmin
 * @version 0.0.1
 * @description Created by work on 2021/10/31 2:34 下午
 * @see
 */
public class JSONUtil {
    public static String toJsonStr(ResultVo failedResult) throws JsonProcessingException {
        ObjectMapper objectMapper = new ObjectMapper();
        String result = objectMapper.writeValueAsString(failedResult);
        return result;
    }
}
